package demo1;

import java.io.File;
import java.io.IOException;

public class Demo_01 {
    public static void main(String[] args) throws IOException {
        File file=new File("d:/temp");
        File file1=new File(file,"bbb.txt");
        System.out.println(file1);
        System.out.println("创建文件是否成功： "+file1.createNewFile());

        File file2=new File("d:\\temp\\ccc");
        System.out.println(file2);
        System.out.println("创建文件是否成功： "+file2.createNewFile());

        File file3=new File("d:/temp","ddd");
        System.out.println(file3);
        System.out.println("创建文件是否成功： "+file3.createNewFile());

    }
}
